import request from '@/utils/request'

// 查询品牌列表
export function listClassify(query) {
  return request({
    url: '/goods/classify',
    method: 'get',
    params: query
  })
}

// 查询品牌详细
export function getClassify(classifyId) {
  return request({
    url: '/goods/classify/' + classifyId,
    method: 'get'
  })
}

// 新增品牌
export function addClassify(data) {
  return request({
    url: '/goods/classify',
    method: 'post',
    data: data
  })
}

// 修改品牌
export function updateClassify(data) {
  return request({
    url: '/goods/classify',
    method: 'put',
    data: data
  })
}

// 删除定时任务调度
export function delClassify(classifyIds) {
  return request({
    url: '/goods/classify/' + classifyIds,
    method: 'delete'
  })
}

// 查询所有分类
export function getClassifyAllList(query) {
  return request({
    url: '/goods/classify/allList',
    method: 'get',
    params: query
  })
}
export default {
  list:listClassify,
  get:getClassify,
  add:addClassify,
  update:updateClassify,
  del:delClassify,
  getClassifyAllList
}